package com.ly.common.core.bean.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 返给前端的树形结构，通用样式
 *
 * @author jeecg
 * @date 2023/4/10 13:39
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "树形结构入参")
public class TreeDTO {
    @Schema(description = "字段中文名称")
    private String label;

    @Schema(description = "字段code")
    private String value;

    @Schema(description = "临时字段，后端可能封装树时，使用temp和parentCode确定关系")
    private String temp;

    @Schema(description = "父编码，组装树使用")
    private String parentCode;

    @Schema(description = "子集")
    private List<TreeDTO> children;
}
